package com.hzlj.position.locate.controller;


import com.fz.common.base.dto.PageParamDTO;
import com.fz.common.base.dto.QueryPageResultDTO;
import com.fz.common.base.dto.ResultDTO;
import com.hzlj.position.config.common.dto.jzJbxxDeviceBind.LocateTimesDeleteDTO;
import com.hzlj.position.config.common.dto.jzJbxxDeviceBind.LocateTimesUpdateDTO;
import com.hzlj.position.locate.common.dto.reportInitiativeSettingJzry.ReportInitiativeSettingJzryQueryParamDTO;
import com.hzlj.position.locate.common.dto.reportInitiativeSettingJzry.ReportInitiativeSettingJzryQueryResultDTO;
import com.hzlj.position.locate.service.ReportInitiativeSettingJzryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 【通信联络核查-人脸签到-配置表-关联矫正人员】接口
 *
 * @author lifh
 * @date 2023-11-13 11:21:27
 */
@Slf4j
@RestController
@RequestMapping("/position/report/initiative/setting/jzry")
public class ReportInitiativeSettingJzryController {

    @Resource
    private ReportInitiativeSettingJzryService reportInitiativeSettingJzryService;

    /**
     * 批量修改定位时间
     */
    @PostMapping(value = "/locateTimes")
    public ResultDTO<Boolean> updateLocateTimes(@RequestBody LocateTimesUpdateDTO dto) {
        log.info("【更新信息】批量修改定位时间={}", dto);
        reportInitiativeSettingJzryService.updateLocateTimes(dto);
        return new ResultDTO<>();
    }

    /**
     * 批量删除定位时间
     */
    @DeleteMapping(value = "/locateTimes")
    public ResultDTO<Boolean> deleteLocateTimes(@RequestBody LocateTimesDeleteDTO dto) {
        log.info("【更新信息】删除定位时间={}", dto);
        reportInitiativeSettingJzryService.deleteLocateTimes(dto);
        return new ResultDTO<>();
    }


    /**
     * 分页查询 通信联络核查-人脸签到-配置表-关联矫正人员
     *
     * @param dto          查询条件
     * @param pageParamDTO 分页信息
     * @return 对象列表
     */
    @GetMapping("/list/page")
    public ResultDTO<QueryPageResultDTO<ReportInitiativeSettingJzryQueryResultDTO>> pageReportInitiativeSettingJzry(ReportInitiativeSettingJzryQueryParamDTO dto, PageParamDTO pageParamDTO) {
        log.debug("【查询分页列表】信息通信联络核查-人脸签到-配置表-关联矫正人员,ReportInitiativeSettingJzryQueryParamDTO={},pageParamDTO={}", dto, pageParamDTO);
        return new ResultDTO<>(reportInitiativeSettingJzryService.pageReportInitiativeSettingJzry(dto, pageParamDTO));
    }

}

